package cn.edu.sgu.www.mhxysy.dto.wenshi;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.consts.RegExps;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class ZuoqiWenshiDTO implements DataTransferObject {

    /**
     * 坐骑ID
     */
    @Pattern(regexp = RegExps.ZUOQI_ID, message = "坐骑ID" + CustomMessages.ILLEGAL)
    @NotBlank(message = CustomMessages.ZUOQI_ID_NOT_NULL)
    @ApiModelProperty(value = "坐骑ID", required = true)
    private String zuoqiId;

    /**
     * 纹饰ID
     */
    @Pattern(regexp = RegExps.WENSHI_ID, message = "纹饰ID" + CustomMessages.ILLEGAL)
    @NotBlank(message = CustomMessages.WENSHI_ID_NOT_NULL)
    @ApiModelProperty(value = "纹饰ID", required = true)
    private String wenshiId;

    /**
     * 镶嵌位置
     * 取值：1、2、3
     */
    @Range(min = 1, max = 3, message = "镶嵌位置" + CustomMessages.ILLEGAL)
    @NotNull(message = "镶嵌位置" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "镶嵌位置", required = true)
    private Integer location;

    /**
     * 镶嵌状态
     * 0-未镶嵌；1-已镶嵌
     */
    @Range(min = 0, max = 1, message = "镶嵌状态" + CustomMessages.ILLEGAL)
    @NotNull(message = "镶嵌状态" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "镶嵌状态", required = true)
    private Integer inlayStatus;
}